package com.cxb.demotest.util;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class NewDateUtil {

    public static final String DATE_FORMAT = "yyyy-MM-dd";
    public static final String DATE_MINUTE_FORMAT = "HH:mm";
    public static final String DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
    public static final String DATE_TIME_FORMAT_APP = "yyyy-MM-dd HH:mm";
    public static final String DATESTYLE_YYYYMMDD = "yyyyMMdd";
    public static final String SIMPLE_BOARD_FORMAT = "MM-dd HH:mm";
    public static final String SMS_FORMAT = "yyyy年MM月dd日";
    public static final String DATE_TIME_NO_SEPARATION_FORMAT = "yyyyMMddHHmmss";
    public static final String DATE_TIME_START_OF_DAY_FORMAT = "yyyy-MM-dd 00:00:00";

    public static String now(String format) {
        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(format);
        return LocalDateTime.now().format(dateTimeFormatter);
    }
}
